<template>
  <a-layout id="components-layout-demo-top-side-2">
    <a-layout-header id="header">
      <div class="logo">
        <img src="../../assets/logo.jpg" style="width: 40px;height:40px" />
        <h1 style="color: blueviolet">超市收银管理系统</h1>
      </div>
      <Exit/>
      <PI :userData=userData />
    </a-layout-header>
    <a-layout>
      <a-layout-sider width="15%" style="background:#ebeef5;margin-left:10px;">
        <div class="left"> 
        <a-menu theme="dark" mode="inline" :default-selected-keys="[$route.path]">
            <a-menu-item key="/home2/shanghuo" id="ant-menu-item">
                <router-link to="/home2/shanghuo">
                    <span><a-icon type="user-add" />上货</span>
               </router-link>
            </a-menu-item>
            <a-menu-item key="/home2/shouyin">
              <router-link to="/home2/shouyin">
                    <span><a-icon type="shop" />收银</span>
              </router-link>
            </a-menu-item>
        </a-menu>
        </div>
      </a-layout-sider>
      <a-layout >
        <a-layout-content
          :style="{ background: '#EBEEF5', padding: '24px', margin: 0, minHeight: '280px' }"
        >
          <router-view/>
        </a-layout-content>
      </a-layout>
    </a-layout>
  </a-layout>
</template>
<script>
import PersonalInformation from '../../components/homec/PersonalInformation.vue';
import Exit from '../../components/homec/Exit.vue'

export default {
  name: 'Home2',
  components: {
    PI:PersonalInformation,
    Exit:Exit
  },
  mounted(){
    this.userData=this.$store.state.user;
  },
  data() {
    return {
      collapsed: false,
      userData:{}
    };
  },
};
</script>


<style  scoped>

#components-layout-demo-top-side-2{
  width: 100%;
  height: 100%;
}
.ant-menu{
  height: 100%;
}
#ant-menu-item{
  margin-top: 50px;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
  
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: blueviolet;
}
 #aside,  .ant-menu,.ant-menu-dark,.ant-layout-sider-dark{
   border-radius: 20px;
  background-color: blueviolet;
  padding-bottom:222%;
}
#header {
  /* background-color: #EBEEF5; */
  background-color: white;
  box-shadow: px 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  height: 10%;
  margin:5px;
  
}
element.style{
  background-color: #ebeef5;
}
.left {
  background-color: #ebeef5;
  width: 100%;
}
.logo {
  margin-top:30px;
  height: 40px;
  width: 300px;
  display: flex;
  padding: 0;
  margin: 0;
  float: left;
}
.logo img{
  margin-top: 15px;
}
.logo h1{
   margin-top: 18px;
  line-height: 30px;
  margin-left: 20px;
}
</style>
